function results = checkHeadAndTail(gsImage, bwImage,sktpAll, kernelRadius,distTransform, prevSkewerAngle) 
            
    rows = size(bwImage,1);
    scoreA = 0;
    scoreB = 0;
    %% Compare curvature
    predictedSkewerAngle = 400;
    try
         A = sktpAll(1,:);
         B = sktpAll(size(sktpAll,1),:);
         results.CurvDiff = compareCurvature( bwImage, A, B, kernelRadius );
    catch
       results.CurvDiff = 0; 
    end
    if results.CurvDiff < 0
        [predictedSkewerAngle, ~ ] = getLineAngles(A,B, rows);
        scoreB = scoreB + 1;
    elseif results.CurvDiff > 0
        [predictedSkewerAngle, ~ ] = getLineAngles(B,A, rows);
        scoreA = scoreA + 1;
    end
    results.SkewerCurv = predictedSkewerAngle;
   
    %% Compare intensities
     predictedSkewerAngle = 400;
    try
         [intDiff, ~, ~]  = compareIntensity( gsImage, bwImage, sktpAll);
         results.IntensityDiff = intDiff;
        
    catch
         results.IntensityDiff = 0;
        
    end
    if results.IntensityDiff > 0
        [predictedSkewerAngle, ~ ] = getLineAngles(A,B, rows);
        scoreB = scoreB + 1;
    elseif results.IntensityDiff < 0
        [predictedSkewerAngle, ~ ] = getLineAngles(B,A, rows);
        scoreA = scoreA + 1;
    end
    results.SkewerIntensity = predictedSkewerAngle;
   
    %% Compare previous head and tail position to current position
      predictedSkewerAngle = 400;
    try
         if prevSkewerAngle == 400;
             results.SkewerAngleDiff = 90; %equal probability of being either
                        
         else
              [ curSkewerAngle, ~] = getLineAngles(B, A, rows);
              diff = getSmallestAngleBetween(curSkewerAngle, prevSkewerAngle);
              results.SkewerAngleDiff = diff;
             
         end
     catch
         results.SkewerAngleDiff = 0;
         results.SkewerAngleDiff = 0;
     end
    if results.SkewerAngleDiff > 90
        [predictedSkewerAngle, ~ ] = getLineAngles(A, B, rows);
        scoreB = scoreB + 1;
    elseif results.SkewerAngleDiff < 90
        [predictedSkewerAngle, ~ ] = getLineAngles(B,A, rows);
        scoreA = scoreA + 1;
    end
    results.SkewerPriorMatch = predictedSkewerAngle;
   
     %% Compare width profile near each end
     predictedSkewerAngle = 400;
     try
      diff = compareWidthProfiles( sktpAll, distTransform, [5,20]);
      results.WidthProfileDiff = diff;
     catch
         results.WidthProfileDiff = 0; 
     end
     if results.WidthProfileDiff < 0
         [predictedSkewerAngle, ~ ] = getLineAngles(A, B, rows);
         scoreB = scoreB +1;
     elseif results.WidthProfileDiff > 0
         [predictedSkewerAngle, ~ ] = getLineAngles(B,A, rows);
         scoreA = scoreA + 1;
     end
     results.SkewerWidth = predictedSkewerAngle;   
     %% Compare scores
     results.ScoreA = scoreA;
     results.ScoreB = scoreB;

     if results.ScoreA > results.ScoreB
         results.Winner = 1;
     elseif results.ScoreA < results.ScoreB
         results.Winner = 2;
     else
         results.Winner = 0;
     end

end

